package com.game.utils 
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	
	public class TestBtn extends Sprite
	{  
		private var disTxt:TextField
		public function TestBtn(str:String, color:uint=0xFFFF00)
		{
			 this.mouseChildren=false
		    disTxt=new TextField()
			disTxt.text=str
			disTxt.autoSize=TextFieldAutoSize.LEFT
			disTxt.x=3
			graphics.beginFill(color)
			graphics.drawRect(0,0,disTxt.width+3*2,disTxt.height)
			graphics.endFill()
			addChild(disTxt)
		}
		public function setTxt(str:String):void{
			disTxt.text=str
		}
	}
}